package mylab.base.foundation.event;


import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import mylab.base.foundation.template.pojo.Pojo;

@Getter
@EqualsAndHashCode(callSuper = true)
public abstract class BaseEvent<S, C> extends Pojo implements Event<S, C> {
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    protected LocalDateTime time = LocalDateTime.now();
    protected S source;
    protected C content;

    public BaseEvent(S source, C content) {
        this.source = source;
        this.content = content;
    }
}
